/**
 * Created by lenovo on 17-6-21.
 */
function send_comment(user,note_id){
    console.log($('#comment').serialize());
    post_ajax('/note/comment',$('#comment').serialize(),function(data){
        console.log(data);
        if(data.status == 200){
            show_alert(data.message,function(){
                jump_page('/note/get_note/' + user +'/' + note_id)
            });
        }
    },function(err){
        console.log(err);
    })
}

function del_comment(id,user,note_id){
    post_ajax('/note/del_comment',{comment_id:id,note_id:note_id},function(data){
        console.log(data);
        if(data.status = 200){
            show_alert(data.message,function(){
                jump_page('/note/get_note/' + user +'/' + note_id)
            });
        }
    },function(err){
        console.log(err);
    })
}

